package report2;

import report2.methods.Calculate;

import java.util.Scanner;

/**
 * Author：zouran
 * Date：2023/4/20  14:47
 * Description:主程序
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.printf("\t\t\t%s\n", "请输入要选择的算法：（0-FCFS; 1 -SJ(P）F; 2-优先权算法;3-时间片轮转算法;-1-退出 )");
            int choice = scanner.nextInt();
            if (choice == -1) break;
            Calculate calculate = new Calculate();
            switch (choice) {
                case 0 -> calculate.FCFS();
                case 1 -> calculate.SJPF();
                case 2 -> calculate.method3();
                case 3 -> calculate.method4();
            }
        }
    }

}
